import { EditorState } from "draft-js"


const useCurrentStyle = (editorState: EditorState) => {
    const currentStyle = editorState.getCurrentInlineStyle();
    return currentStyle
}

export const useCurrentStyleColor = (editorState: EditorState, style: string) => {
    const currentStyle = useCurrentStyle(editorState);
    if (currentStyle.has(style)) return "#3f51bf";
    return "#000"
}

export default useCurrentStyle